Handle introduce_domain failing when the domain is already introduced.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 27 Jul 2005 18:31:03 +0000 (18:31 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 27 Jul 2005 18:31:03 +0000 (18:31 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/xenstore/xsnode.py

index 94b264c3cf24a85c68c9f8cae604af8aa5252d42..b6f728c0ea05239e47d1eff037292452c4a47d62 100644 (file)
@@ -350,7 +350,13 @@ class XenStore:
             self.watchThread = None
 
     def introduceDomain(self, dom, page, evtchn, path):
-        self.getxs().introduce_domain(dom, page, evtchn.port1, path)
+        try:
+            self.getxs().introduce_domain(dom, page, evtchn.port1, path)
+        except RuntimeError, ex:
+            if ex.args[0] == errno.EISCONN:
+                return None
+            else:
+                raise
 
     def releaseDomain(self, dom):
         self.getxs().release_domain(dom)